package kms

func init() {
	methodGetList = append(methodGetList, "Enroll")
}

type EnrollReq struct {
}

func (req *EnrollReq) action() string {
	return "Enroll"
}

type EnrollRes struct {
	ResCommon
	Result struct {
		AppId  string `json:"appid"`
		AppKey string `json:"apikey"`
	} `json:"result"`
}

func (c *Client) Enroll() (res EnrollRes, err error) {
	err = c.Request(&EnrollReq{}, &res)
	return
}

func (c *Client) Register() (res EnrollRes, err error) {
	return c.Enroll()
}
